<template>
  <div>
      <h3>count的值为:{{count}},count是一个:{{evenOrOdd}}</h3>
      <button @click="INCREMENT(1)">按钮+</button>
      <button @click="DECREMENT(1)">按钮-</button>
      <button @click="evenAdd(1)">按钮奇数加</button>
      <button @click="asyncAdd(1)">按钮异步加</button>
  </div>
</template>

<script>
import {mapState,mapMutations,mapActions,mapGetters} from 'vuex'
export default {
  name: 'App',
  computed:{
      ...mapState(['count']),
      ...mapGetters(['evenOrOdd'])
  },
  methods:{
      ...mapMutations(['INCREMENT','DECREMENT']),
      ...mapActions(['evenAdd','asyncAdd'])
  }
}
</script>

<style lang="less" scoped>

</style>
